package com.example.mapper;

import com.example.common.TableServerResponse;
import com.example.pojo.Parking;
import com.example.vo.ParkingListVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ParkingMapper {
    int deleteByPrimaryKey(String parkingId);

    int insert(Parking record);

    int insertSelective(Parking record);

    Parking selectByPrimaryKey(String parkingId);

    int updateByPrimaryKeySelective(Parking record);

    int updateByPrimaryKeyWithBLOBs(Parking record);

    int updateByPrimaryKey(Parking record);

    //查所有车位
    List<ParkingListVO> getParkingList();

    //审核车位
    Integer verify(ParkingListVO parkingListVO);

    //模糊查询车位
    List<ParkingListVO> searchParking(ParkingListVO parkingListVO);

    //Demo
//    @Insert("insert into `parking`(parking_id,property_id,parking_no,parking_property_right,rent_id,rent_money,rent_way) values(#{parkingId},#{propertyId},#{parkingNo},#{parkingPropertyRight},#{rentId},#{rentMoney},#{rentWay})")
//    Integer addEsParking(Parking parking);
//
//    @Select("select * from `parking` where parking_id=#{parkingId}")
//    Parking getParkingById(String parkingId);
//
//    @Delete("delete from `parking` where property_id=#{propertyId}")
//    Integer deleteParking(String propertyId);
//
//    @Update("update `parking` set property_id=#{propertyId},parking_no=#{parkingNo},parking_property_right={parkingPropertyRight},rent_id=#{rentId},rent_money=#{rentMoney},rent_way=#{rentWay} where parking_id=#{parkingId}")
//    Integer updateParking(Parking parking);
}